<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>业主未付账单列表</title>
<LINK href="images/css.css" type="text/css" rel="stylesheet">
<script type="text/javascript">

</script>
</head>
<body>
  <table align="center" width="80%" border="0">
    <tr>
      <td class="STYLE4" align="center" bgcolor="#ffffff" colspan="2" height="40">业主未付账单列表</td>
    </tr>
    <tr><td><table align="center" class="tableline" cellspacing="1" cellpadding="0" width="100%" border="0">
    <tr>
      <th width="10%" height="26" align="center" bgcolor="#ffffff">账单编号</th>
      <th width="15%" height="26" align="center" bgcolor="#ffffff">房产编号</th>
      <th width="15%" height="26" align="center" bgcolor="#ffffff">所属小区</th>
      <th width="15%" height="26" align="center" bgcolor="#ffffff">业主姓名</th>
      <th width="15%" height="26" align="center" bgcolor="#ffffff">账单日期</th>
      <th width="15%" height="26" align="center" bgcolor="#ffffff">账单金额</th>
      <th width="15%" height="26" align="center" bgcolor="#ffffff">账单详情</th>
    </tr>
    <c:if test="${!empty billList}">
	<c:forEach items="${billList}" var="bill">
	    <tr>
	      <td width="10%" height="26" align="center" bgcolor="#ffffff">${bill.id }</td>
	      <td width="15%" height="26" align="center" bgcolor="#ffffff">${bill.house.houseId }</td>
	      <td width="15%" height="26" align="center" bgcolor="#ffffff">${bill.house.building.subDistrict.name }</td>
	      <td width="15%" height="26" align="center" bgcolor="#ffffff">${bill.house.owner.name }</td>
	      <td width="15%" height="26" align="center" bgcolor="#ffffff">
	      	<c:choose>
	      		<c:when test="${bill.year eq 0 and bill.month eq 0 }">历史欠费</c:when>
	      		<c:otherwise>${bill.year }年${bill.month }月</c:otherwise>
	      	</c:choose>
	      </td>
	      <td width="15%" height="26" align="center" bgcolor="#ffffff"><fmt:formatNumber value="${bill.amount }" pattern="#.00" /></td>
	      <td width="15%" height="26" align="center" bgcolor="#ffffff"><a href="charge.do?method=search&billId=${bill.id }" style="font-size:12px;color: #5f9c12;">单击查看</a></td>
	    </tr>
	</c:forEach>
	</c:if>
	<c:if test="${size > 1}">
		<tr>
	      <td colspan="7" height="26" align="right" bgcolor="#ffffff">共计：<fmt:formatNumber value="${mergePayAmount }" pattern="#.00" />元&nbsp;&nbsp;<a href="bill.do?method=mergePay&ids=${ids }" style="font-size:12px;color: #5f9c12;">合并支付</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
	    </tr>
	</c:if>
	</table></td></tr>
  </table>
  <p style="font-size:12px;text-align:right;margin-right:125px;"><img src="images/arrow.gif">点击这里<a href="#" style="font-size:12px;color: #5f9c12;">查询业主已付账单</a></p>
</body>
</html>